<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>javascript build website</title>

<link rel="stylesheet"
	href="http://yui.yahooapis.com/3.5.0pr4/build/cssreset/cssreset.css"
	type="text/css">
<link rel="stylesheet"
	href="http://yui.yahooapis.com/3.5.0pr4/build/cssfonts/cssfonts.css"
	type="text/css">

<!--
     <link rel="stylesheet" href="http://www.m3958.com/yui/3.5.0pr2/build/cssreset/cssreset.css" type="text/css">
    <link rel="stylesheet" href="http://www.m3958.com/yui/3.5.0pr2/build/cssfonts/cssfonts.css" type="text/css">
     
<script src="http://www.m3958.com/yui/3.5.0pr2/build/yui/yui-min.js"></script>
 -->
<script src="http://yui.yahooapis.com/3.5.0pr4/build/yui/yui-min.js"></script>
<!-- 
<script type="text/javascript"
	src="/yuicombo?prefix=/m3958-module-js/&mouse-move-delay.js&simple-box-widget.js&bing-box-widget.js&message-panel.js&menu-html-creator.js&javascriptsite.js&javascriptsection.js&javascriptarticle.js&frontpage-slideshow.js"></script>
<link rel="stylesheet"
	href="/yuicombo?prefix=/m3958-module-css/&type=css&bing-box-widget.css&message-panel.css&frontpage-slideshow.css">
 -->
<style type="text/css">
.not-focus-yet {
	color: gray;
}

body { /*	background-image: url("./hprichbg.jpg");*/
	height: 1000px;
	font-family: Arial, Sans-Serif;
}
.mydiv div div{
	background-color: blue;
}


.mydiv div{
	background-color: red;
}
</style>
<script type="text/javascript">
var m3958_site_config = {siteId:8065,
					mainMenu:{
						mainMenuContainer:'#abc',
						mainMenuCssPath:'m3958-module-css/menu-template-1.css'
					},
					frontPageSlideShow :{
						frontPageSlideContainer : '#fpslide',
						slideShowTags : '首页幻灯',
						slideShowCssPath : '/m3958-module-css/frontpage-slideshow.css'
					},
					sectionConfigBase : {
						hdTpl : '{name}',
						articleNum : 5,
						titleLength : 10,
						bodyTpl : '<ul>{articleList}</ul>',
						titleTpl : '<li><span class="article_title">{title}<span><span class="article_published_at">{publishedAt}</span></li>',
						datefmt : 'yyyy/mm/dd' 
					},
					sectionConfigs : {
						'23868' : {
							titleLength : 10,
						}
					}
				};

/*
var m3958_hostname = "http://www.m3958.com/";
(function(){
	var hr = window.location.href;
	if(hr.indexOf('8888') == -1){
		if(hr.indexOf('debug=true') != -1){
			m3958_hostname = 'file:///E:/eclipse-jee-helios-SR1-win32/xyzcms/war/';
		}
	}else{
		m3958_hostname = 'http://127.0.0.1:8888/';
	}
})();
YUI({
	combine: true,
	comboBase: m3958_hostname + 'combo/yui?',
		
	modules:{
		'bing-box-widget-css' : {
	        type: "css",
	        fullpath: m3958_hostname + 'm3958-module-css/bing-box-widget.css'
		},
		'mouse-move-delay' : {
			requires:["base","event"],
			fullpath : m3958_hostname + 'm3958-module-js/mouse-move-delay.js'
		},
		'simple-box-widget' : {
			requires:["base","widget","widget-position","widget-position-align", "substitute","array-extras","bing-box-widget-css","transition","event"],
			fullpath : m3958_hostname + 'm3958-module-js/simple-box-widget.js'
		},
		'bing-box-widget' : {
			requires:["base","widget","widget-position","widget-position-align", "substitute","array-extras","bing-box-widget-css","transition","event","mouse-move-delay","simple-box-widget"],
			fullpath : m3958_hostname + 'm3958-module-js/bing-box-widget.js'
		}
}
}).use('frontpage-slideshow','node-menunav','javascript-site','javascript-section','javascript-article','bing-box-widget','simple-box-widget','message-panel','menu-html-creator',function(Y){
	
	var fp = new Y.M3958.FrontpageSlideShow({'siteId':8065,'tags':'你好,他好',render:true,autoSlide:true,width:450,height:300,interval:3,imgSize:'48x48',numBoxAlign:'vertical'});
	fp.fetchArticles(0,5);

	Y.on('domready',function(){
		var bingbox1 = new Y.M3958.BingBoxWidget({xy :[200,200],pairBox:new Y.M3958.SimpleBoxWidget({width:300})});
		bingbox1.render();
		var bingbox2 = new Y.M3958.BingBoxWidget({xy :[200,200],pairBox:new Y.M3958.SimpleBoxWidget({width:300})});
		bingbox2.render();
		var bingbox3 = new Y.M3958.BingBoxWidget({xy :[200,200],pairBox:new Y.M3958.SimpleBoxWidget({width:300})});
		bingbox3.render();
	});
	
	var jsite = new Y.M3958.JavascriptSite({siteId : 74067});
	
	jsite.on('siteReady',function(e){
		var section = jsite.findSection(74087);
		Y.log(section.gett('id'));
		section.fetchArticles(0,5,{usage:['slide']});//既可以单独监听，也可以站点范围的监听。
		
		var mc = new Y.M3958.MenuHtmlCreator({menuItems: jsite.site.linkList});
		var mh = mc.getMenuHtml(); 
		Y.one('#mm').setContent(mh);
		
		var dayanMenu = Y.one("#m3958-menu--1");
		dayanMenu.plug(Y.Plugin.NodeMenuNav);
		
		Y.log(mh);
	});
	
	jsite.fetchSite();

	var mp = new Y.M3958.MessagePanel({
        bodyContent: '<div class="message icon-warn">Are you sure you want to [take some action]?</div>',
        width      : 410,
        zIndex     : 6,
        centered   : true,
        modal      : false, // modal behavior
        render     : true,
        srcNode : '#dialog',
        visible    : false, // make visible explicitly with .show()
	    buttons: [
	        {
	            value  : '知道了',
	            name : 'okay',
	            section: Y.WidgetStdMod.FOOTER,
	            action : function (e) {
	            	Y.log(this);
	                e.preventDefault();
	                mp.hide();
	            }
	        }
	    ]
    });
	mp.render();
	mp.warn('hello warn');
});
*/
</script>
</head>
<body class="yui3-skin-sam">

	<div id="abc">
	</div>
	<div class="m3958-section-container" id="m3958-section-container-23868"></div>
	<div id="fpslide"></div>
	<div id='dialog'></div>
	<span title="你好">abc</span>
	<p>
		<!--pagebreak-->
	</p>
	<div id='mm'></div>
	<script type="text/javascript"
		src="/m3958-module-js/javascript-site-template.js"></script>
<div class="mydiv">
<div style="width: 50px;height: 50px;">
	<div style="width: 30px;height: 30px;"></div>
</div>
</div>
</body>
</html>